<?php

//  define('SHOW_VARIABLES', 1);
//  define('DEBUG_LEVEL', 1);

//  error_reporting(E_ALL ^ E_NOTICE);
//  ini_set('display_errors', 'On');

set_include_path('.' . PATH_SEPARATOR . get_include_path());


require_once 'components/utils/system_utils.php';

//  SystemUtils::DisableMagicQuotesRuntime();

SystemUtils::SetTimeZoneIfNeed('Asia/Krasnoyarsk');

function GetGlobalConnectionOptions()
{
    return array(
  'server' => '127.0.0.1',
  'port' => '3306',
  'username' => 'root',
  'database' => 'atf'
);
}

function GetPageInfos()
{
    $result = array();
    $result[] = array('caption' => 'Contact Form', 'short_caption' => 'Contact Form', 'filename' => 'contact_form.php', 'name' => 'contact_form');
    $result[] = array('caption' => 'Currency', 'short_caption' => 'Currency', 'filename' => 'currency.php', 'name' => 'currency');
    $result[] = array('caption' => 'Doi Tac', 'short_caption' => 'Doi Tac', 'filename' => 'doi_tac.php', 'name' => 'doi_tac');
    $result[] = array('caption' => 'Donator', 'short_caption' => 'Donator', 'filename' => 'donator.php', 'name' => 'donator');
    $result[] = array('caption' => 'Donator Tre', 'short_caption' => 'Donator Tre', 'filename' => 'donator_tre.php', 'name' => 'donator_tre');
    $result[] = array('caption' => 'Events', 'short_caption' => 'Events', 'filename' => 'events.php', 'name' => 'events');
    $result[] = array('caption' => 'Giam Ho', 'short_caption' => 'Giam Ho', 'filename' => 'giam_ho.php', 'name' => 'giam_ho');
    $result[] = array('caption' => 'Goi Qua', 'short_caption' => 'Goi Qua', 'filename' => 'goi_qua.php', 'name' => 'goi_qua');
    $result[] = array('caption' => 'Ket Qua', 'short_caption' => 'Ket Qua', 'filename' => 'ket_qua.php', 'name' => 'ket_qua');
    $result[] = array('caption' => 'Kq Hoc Tap', 'short_caption' => 'Kq Hoc Tap', 'filename' => 'kq_hoc_tap.php', 'name' => 'kq_hoc_tap');
    $result[] = array('caption' => 'Program', 'short_caption' => 'Program', 'filename' => 'program.php', 'name' => 'program');
    $result[] = array('caption' => 'Quoc Gia', 'short_caption' => 'Quoc Gia', 'filename' => 'quoc_gia.php', 'name' => 'quoc_gia');
    $result[] = array('caption' => 'Selection', 'short_caption' => 'Selection', 'filename' => 'selection.php', 'name' => 'selection');
    $result[] = array('caption' => 'Tinh Trang Apply', 'short_caption' => 'Tinh Trang Apply', 'filename' => 'tinh_trang_apply.php', 'name' => 'tinh_trang_apply');
    $result[] = array('caption' => 'Tre', 'short_caption' => 'Tre', 'filename' => 'tre.php', 'name' => 'tre');
    $result[] = array('caption' => 'User', 'short_caption' => 'User', 'filename' => 'user.php', 'name' => 'user');
    return $result;
}

function GetPagesHeader()
{
    return
    '';
}

function GetPagesFooter()
{
    return
        ''; 
    }

function ApplyCommonPageSettings($page, $grid)
{
    $page->SetShowUserAuthBar(false);
    $grid->BeforeUpdateRecord->AddListener('Global_BeforeUpdateHandler');
    $grid->BeforeDeleteRecord->AddListener('Global_BeforeDeleteHandler');
    $grid->BeforeInsertRecord->AddListener('Global_BeforeInsertHandler');
}

/*
  Default code page: 1252
*/
function GetAnsiEncoding() { return 'windows-1252'; }

function Global_BeforeUpdateHandler($page, $rowData, &$cancel, &$message, $tableName)
{

}

function Global_BeforeDeleteHandler($page, $rowData, &$cancel, &$message, $tableName)
{

}

function Global_BeforeInsertHandler($page, $rowData, &$cancel, &$message, $tableName)
{

}

function GetDefaultDateFormat()
{
    return 'Y-m-d';
}
?>